package com.lry.basic.spring.aop.test;

import com.lry.basic.spring.aop.anno.After;
import com.lry.basic.spring.aop.anno.Aspect;
import com.lry.basic.spring.aop.anno.Before;
import com.lry.basic.spring.aop.anno.PointCut;
import com.lry.basic.spring.ioc.anno.Component;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/11/19
 */
@Aspect //切面
@Component
public class MyAspect {
    //切点
    @PointCut("execution(* com.lry.basic.spring.aop.test.ABean.*(..))")
    public void pointCut(){}

    @Before("pointCut")
    public void before(){
        System.out.println("before");
    }

    @After("pointCut")
    public void after(){
        System.out.println("after");
    }


}
